.class public Lcn/cheln/support/adapter/MapAdapter;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:I

.field protected b:Landroid/content/Context;

.field protected c:Ljava/util/List;

.field protected d:[I

.field public e:Z

.field private f:Lcn/cheln/support/adapter/a;

.field private g:[Lcn/cheln/support/adapter/c;

.field private h:Ljava/util/Map;

.field private i:Ljava/util/Map;

.field private j:Ljava/util/List;

.field private k:Ljava/lang/Class;

.field private l:Ljava/util/List;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->i:Ljava/util/Map;

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcn/cheln/support/adapter/MapAdapter;->e:Z

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    iput-object p1, p0, Lcn/cheln/support/adapter/MapAdapter;->b:Landroid/content/Context;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lcn/cheln/support/adapter/d;)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->i:Ljava/util/Map;

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcn/cheln/support/adapter/MapAdapter;->e:Z

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    invoke-virtual {p0, p2}, Lcn/cheln/support/adapter/MapAdapter;->a(Lcn/cheln/support/adapter/d;)V

    iput-object p1, p0, Lcn/cheln/support/adapter/MapAdapter;->b:Landroid/content/Context;

    return-void
.end method

.method private static a(Ljava/util/List;I)V
    .locals 2

    invoke-interface {p0, p0}, Ljava/util/List;->removeAll(Ljava/util/Collection;)Z

    const/4 v0, 0x0

    :goto_0
    if-ge v0, p1, :cond_0

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {p0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method


# virtual methods
.method public final a(IZ)V
    .locals 2

    if-eqz p2, :cond_1

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/List;->lastIndexOf(Ljava/lang/Object;)I

    move-result v0

    if-ltz v0, :cond_0

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    goto :goto_0
.end method

.method protected a(Landroid/view/View;ILjava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V
    .locals 6

    const/4 v5, 0x0

    :try_start_0
    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->c:Ljava/util/List;

    invoke-interface {v1, p4}, Ljava/util/List;->indexOf(Ljava/lang/Object;)I

    move-result v1

    iget-object v2, p0, Lcn/cheln/support/adapter/MapAdapter;->d:[I

    aget v1, v2, v1

    invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    const/4 v1, 0x0

    invoke-virtual {v2, v1}, Landroid/view/View;->setVisibility(I)V

    instance-of v1, v2, Landroid/widget/ImageView;

    if-eqz v1, :cond_2

    if-eqz p5, :cond_0

    invoke-virtual {p5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    const-string v3, "-1"

    invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    :cond_0
    :goto_0
    return-void

    :cond_1
    instance-of v1, p5, Ljava/lang/Integer;

    if-eqz v1, :cond_3

    move-object v0, v2

    check-cast v0, Landroid/widget/ImageView;

    move-object v1, v0

    invoke-virtual {p5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v3

    invoke-virtual {v1, v3}, Landroid/widget/ImageView;->setImageResource(I)V

    :cond_2
    :goto_1
    instance-of v1, v2, Landroid/widget/CheckBox;

    if-eqz v1, :cond_6

    move-object v0, v2

    check-cast v0, Landroid/widget/CheckBox;

    move-object v3, v0

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-interface {v1, v4}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v1

    invoke-virtual {v3, v1}, Landroid/widget/CheckBox;->setChecked(Z)V

    check-cast v2, Landroid/widget/CheckBox;

    iget-boolean v1, p0, Lcn/cheln/support/adapter/MapAdapter;->e:Z

    if-eqz v1, :cond_5

    move v1, v5

    :goto_2
    invoke-virtual {v2, v1}, Landroid/widget/CheckBox;->setVisibility(I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception v1

    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0

    :cond_3
    :try_start_1
    invoke-virtual {p5}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    const-class v3, Landroid/graphics/drawable/BitmapDrawable;

    if-ne v1, v3, :cond_4

    move-object v0, v2

    check-cast v0, Landroid/widget/ImageView;

    move-object v3, v0

    move-object v0, p5

    check-cast v0, Landroid/graphics/drawable/BitmapDrawable;

    move-object v1, v0

    invoke-virtual {v3, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_1

    :cond_4
    instance-of v1, p5, Landroid/graphics/drawable/Drawable;

    if-eqz v1, :cond_2

    move-object v0, v2

    check-cast v0, Landroid/widget/ImageView;

    move-object v3, v0

    move-object v0, p5

    check-cast v0, Landroid/graphics/drawable/Drawable;

    move-object v1, v0

    invoke-virtual {v3, v1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    goto :goto_1

    :cond_5
    const/16 v1, 0x8

    goto :goto_2

    :cond_6
    instance-of v1, v2, Landroid/widget/TextView;

    if-eqz v1, :cond_0

    check-cast v2, Landroid/widget/TextView;

    instance-of v1, p5, Landroid/text/SpannableStringBuilder;

    if-eqz v1, :cond_7

    check-cast p5, Landroid/text/SpannableStringBuilder;

    move-object v1, p5

    :goto_3
    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_0

    :cond_7
    invoke-virtual {p5}, Ljava/lang/Object;->toString()Ljava/lang/String;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v1

    goto :goto_3
.end method

.method public a(Lcn/cheln/support/adapter/a;)V
    .locals 1

    iput-object p1, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcn/cheln/support/adapter/MapAdapter;->e:Z

    :cond_0
    return-void
.end method

.method public final a(Lcn/cheln/support/adapter/d;)V
    .locals 7

    iget-object v0, p1, Lcn/cheln/support/adapter/d;->b:[Ljava/lang/String;

    invoke-static {v0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->c:Ljava/util/List;

    iget-object v0, p1, Lcn/cheln/support/adapter/d;->c:[I

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->d:[I

    iget v0, p1, Lcn/cheln/support/adapter/d;->d:I

    iput v0, p0, Lcn/cheln/support/adapter/MapAdapter;->a:I

    iget-object v0, p1, Lcn/cheln/support/adapter/d;->a:Lcn/cheln/support/adapter/a;

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    iget-object v0, p1, Lcn/cheln/support/adapter/d;->e:[Lcn/cheln/support/adapter/c;

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->g:[Lcn/cheln/support/adapter/c;

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->g:[Lcn/cheln/support/adapter/c;

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->h:Ljava/util/Map;

    if-nez v0, :cond_0

    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->h:Ljava/util/Map;

    :cond_0
    if-eqz v1, :cond_1

    array-length v0, v1

    if-nez v0, :cond_2

    :cond_1
    return-void

    :cond_2
    array-length v2, v1

    const/4 v0, 0x0

    move v3, v0

    :goto_0
    if-ge v3, v2, :cond_1

    aget-object v4, v1, v3

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->h:Ljava/util/Map;

    iget v5, v4, Lcn/cheln/support/adapter/c;->b:I

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_3

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->h:Ljava/util/Map;

    iget v5, v4, Lcn/cheln/support/adapter/c;->b:I

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    new-instance v6, Lcn/cheln/support/adapter/ListenerBox;

    invoke-direct {v6, p0, v4}, Lcn/cheln/support/adapter/ListenerBox;-><init>(Lcn/cheln/support/adapter/MapAdapter;Lcn/cheln/support/adapter/c;)V

    invoke-interface {v0, v5, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :goto_1
    add-int/lit8 v0, v3, 0x1

    move v3, v0

    goto :goto_0

    :cond_3
    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->h:Ljava/util/Map;

    iget v5, v4, Lcn/cheln/support/adapter/c;->b:I

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    invoke-interface {v0, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcn/cheln/support/adapter/ListenerBox;

    invoke-virtual {v0, v4}, Lcn/cheln/support/adapter/ListenerBox;->a(Lcn/cheln/support/adapter/c;)V

    goto :goto_1
.end method

.method protected a(Ljava/lang/Object;ILandroid/view/View;)V
    .locals 12

    const/4 v2, 0x0

    const/4 v9, 0x0

    if-nez p1, :cond_1

    :cond_0
    return-void

    :cond_1
    instance-of v1, p1, Landroid/database/Cursor;

    if-eqz v1, :cond_7

    move-object v0, p1

    check-cast v0, Landroid/database/Cursor;

    move-object v7, v0

    invoke-interface {v7}, Landroid/database/Cursor;->getColumnCount()I

    move-result v1

    if-lez v1, :cond_0

    move-object v1, v2

    :goto_0
    invoke-interface {v7}, Landroid/database/Cursor;->moveToNext()Z

    move-result v2

    if-eqz v2, :cond_0

    move v8, v9

    move-object v2, v1

    :goto_1
    invoke-interface {v7}, Landroid/database/Cursor;->getColumnCount()I

    move-result v1

    if-ge v8, v1, :cond_6

    invoke-interface {v7, v8}, Landroid/database/Cursor;->getColumnName(I)Ljava/lang/String;

    move-result-object v5

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    invoke-virtual {v1}, Lcn/cheln/support/adapter/a;->a()Ljava/util/Map;

    move-result-object v1

    invoke-interface {v1, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Class;

    :try_start_0
    const-class v3, Ljava/lang/Integer;

    if-ne v1, v3, :cond_3

    invoke-interface {v7, v8}, Landroid/database/Cursor;->getInt(I)I

    move-result v1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v1

    move-object v6, v1

    :goto_2
    if-eqz v6, :cond_2

    move-object v1, p0

    move-object v2, p3

    move v3, p2

    move-object v4, p1

    invoke-virtual/range {v1 .. v6}, Lcn/cheln/support/adapter/MapAdapter;->a(Landroid/view/View;ILjava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V

    :cond_2
    add-int/lit8 v1, v8, 0x1

    move v8, v1

    move-object v2, v6

    goto :goto_1

    :cond_3
    :try_start_1
    const-class v3, Ljava/lang/Long;

    if-ne v1, v3, :cond_4

    invoke-interface {v7, v8}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v3

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    move-object v6, v1

    goto :goto_2

    :cond_4
    const-class v3, Ljava/lang/Double;

    if-ne v1, v3, :cond_5

    invoke-interface {v7, v8}, Landroid/database/Cursor;->getDouble(I)D

    move-result-wide v3

    invoke-static {v3, v4}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v1

    move-object v6, v1

    goto :goto_2

    :cond_5
    const-class v3, Ljava/lang/String;

    if-ne v1, v3, :cond_c

    invoke-interface {v7, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    move-result-object v1

    :goto_3
    move-object v6, v1

    goto :goto_2

    :catch_0
    move-exception v1

    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    move-object v6, v2

    goto :goto_2

    :cond_6
    move-object v1, v2

    goto :goto_0

    :cond_7
    instance-of v1, p1, Ljava/util/Map;

    if-eqz v1, :cond_9

    move-object v0, p1

    check-cast v0, Ljava/util/Map;

    move-object v7, v0

    move v8, v9

    :goto_4
    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->c:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-ge v8, v1, :cond_0

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->c:Ljava/util/List;

    invoke-interface {v1, v8}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;

    invoke-interface {v7, v5}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_8

    invoke-interface {v7, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v6

    move-object v1, p0

    move-object v2, p3

    move v3, p2

    move-object v4, p1

    invoke-virtual/range {v1 .. v6}, Lcn/cheln/support/adapter/MapAdapter;->a(Landroid/view/View;ILjava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V

    :cond_8
    add-int/lit8 v1, v8, 0x1

    move v8, v1

    goto :goto_4

    :cond_9
    invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

    iput-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->k:Ljava/lang/Class;

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->k:Ljava/lang/Class;

    invoke-virtual {v1}, Ljava/lang/Class;->getFields()[Ljava/lang/reflect/Field;

    move-result-object v7

    array-length v8, v7

    move-object v1, v2

    :goto_5
    if-ge v9, v8, :cond_0

    aget-object v10, v7, v9

    invoke-virtual {v10}, Ljava/lang/reflect/Field;->isAccessible()Z

    move-result v11

    const/4 v2, 0x1

    invoke-virtual {v10, v2}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    iget-object v2, p0, Lcn/cheln/support/adapter/MapAdapter;->c:Ljava/util/List;

    invoke-virtual {v10}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/List;->contains(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_b

    invoke-virtual {v10}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;

    move-result-object v5

    :try_start_2
    invoke-virtual {v10, p1}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_2
    .catch Ljava/lang/IllegalArgumentException; {:try_start_2 .. :try_end_2} :catch_1
    .catch Ljava/lang/IllegalAccessException; {:try_start_2 .. :try_end_2} :catch_2

    move-result-object v1

    move-object v6, v1

    :goto_6
    if-eqz v6, :cond_a

    move-object v1, p0

    move-object v2, p3

    move v3, p2

    move-object v4, p1

    invoke-virtual/range {v1 .. v6}, Lcn/cheln/support/adapter/MapAdapter;->a(Landroid/view/View;ILjava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V

    :cond_a
    move-object v1, v6

    :cond_b
    invoke-virtual {v10, v11}, Ljava/lang/reflect/Field;->setAccessible(Z)V

    add-int/lit8 v2, v9, 0x1

    move v9, v2

    goto :goto_5

    :catch_1
    move-exception v2

    invoke-virtual {v2}, Ljava/lang/IllegalArgumentException;->printStackTrace()V

    move-object v6, v1

    goto :goto_6

    :catch_2
    move-exception v2

    invoke-virtual {v2}, Ljava/lang/IllegalAccessException;->printStackTrace()V

    move-object v6, v1

    goto :goto_6

    :cond_c
    move-object v1, v2

    goto/16 :goto_3
.end method

.method public final a(Z)V
    .locals 2

    if-eqz p1, :cond_1

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->l:Ljava/util/List;

    if-eqz v0, :cond_0

    new-instance v0, Ljava/util/ArrayList;

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->l:Ljava/util/List;

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    goto :goto_0
.end method

.method public final b()Ljava/lang/Boolean;
    .locals 1

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    return-object v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public final b(I)V
    .locals 1

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, p1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0, p1}, Ljava/util/ArrayList;-><init>(I)V

    iput-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->l:Ljava/util/List;

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->l:Ljava/util/List;

    invoke-static {v0, p1}, Lcn/cheln/support/adapter/MapAdapter;->a(Ljava/util/List;I)V

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->i:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->clear()V

    return-void
.end method

.method public final b(Z)V
    .locals 0

    iput-boolean p1, p0, Lcn/cheln/support/adapter/MapAdapter;->e:Z

    return-void
.end method

.method public final c()Ljava/util/Map;
    .locals 1

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->i:Ljava/util/Map;

    return-object v0
.end method

.method public final d()V
    .locals 1

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    if-nez v0, :cond_0

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    invoke-virtual {v0}, Lcn/cheln/support/adapter/a;->c()V

    goto :goto_0
.end method

.method public final e()Lcn/cheln/support/adapter/a;
    .locals 1

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    return-object v0
.end method

.method public final f()Ljava/util/List;
    .locals 1

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    return-object v0
.end method

.method public final g()Z
    .locals 1

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getCount()I
    .locals 2

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "== itemdatasrc "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    invoke-virtual {v1}, Lcn/cheln/support/adapter/a;->d()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcn/cheln/support/app/c;->a(Ljava/lang/String;)V

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    invoke-virtual {v0}, Lcn/cheln/support/adapter/a;->d()I

    move-result v0

    goto :goto_0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    invoke-virtual {v0}, Lcn/cheln/support/adapter/a;->d()I

    move-result v0

    if-ge v0, p1, :cond_1

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return-object v0

    :cond_1
    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->f:Lcn/cheln/support/adapter/a;

    invoke-virtual {v0, p1}, Lcn/cheln/support/adapter/a;->a(I)Ljava/lang/Object;

    move-result-object v0

    goto :goto_0
.end method

.method public getItemId(I)J
    .locals 2

    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 8

    invoke-virtual {p0, p1}, Lcn/cheln/support/adapter/MapAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object v4

    if-nez p2, :cond_3

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->b:Landroid/content/Context;

    invoke-static {v1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    iget v2, p0, Lcn/cheln/support/adapter/MapAdapter;->a:I

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    move-object v5, v1

    :goto_0
    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->i:Ljava/util/Map;

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    invoke-interface {v1, v5, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->h:Ljava/util/Map;

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcn/cheln/support/adapter/MapAdapter;->h:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v6

    :cond_0
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_2

    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map$Entry;

    invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/Integer;

    invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcn/cheln/support/adapter/ListenerBox;

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    invoke-static {v5, v2}, Lcn/cheln/support/app/a;->a(Ljava/lang/Object;I)Landroid/view/View;

    move-result-object v3

    iget-object v2, v1, Lcn/cheln/support/adapter/ListenerBox;->a:Ljava/util/Map;

    invoke-interface {v2}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v7

    :cond_1
    :goto_1
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_0

    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/Map$Entry;

    invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/Integer;

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    packed-switch v2, :pswitch_data_0

    goto :goto_1

    :pswitch_0
    invoke-virtual {v3, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_1

    :pswitch_1
    invoke-virtual {v3, v1}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V

    goto :goto_1

    :pswitch_2
    invoke-virtual {v3, v1}, Landroid/view/View;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    goto :goto_1

    :pswitch_3
    instance-of v2, v3, Landroid/widget/CheckBox;

    if-eqz v2, :cond_1

    move-object v0, v3

    check-cast v0, Landroid/widget/CheckBox;

    move-object v2, v0

    invoke-virtual {v2, v1}, Landroid/widget/CheckBox;->setOnCheckedChangeListener(Landroid/widget/CompoundButton$OnCheckedChangeListener;)V

    goto :goto_1

    :cond_2
    invoke-virtual {p0, v4, p1, v5}, Lcn/cheln/support/adapter/MapAdapter;->a(Ljava/lang/Object;ILandroid/view/View;)V

    return-object v5

    :cond_3
    move-object v5, p2

    goto :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
        :pswitch_3
    .end packed-switch
.end method

.method public final h()Z
    .locals 2

    iget-object v0, p0, Lcn/cheln/support/adapter/MapAdapter;->j:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    invoke-virtual {p0}, Lcn/cheln/support/adapter/MapAdapter;->getCount()I

    move-result v1

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public notifyDataSetChanged()V
    .locals 0

    invoke-super {p0}, Landroid/widget/BaseAdapter;->notifyDataSetChanged()V

    return-void
.end method
